<template>
 <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="num"
        label="编号"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="名称"
        width="180">
      </el-table-column>
      <el-table-column
        prop="type"
        label="类型">
      </el-table-column>
          <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          type = "primary"
           plain = "true"
          @click="handleEdit(scope.$index, scope.row)">录入</el-button>
          <el-button 
           size="mini"
          type = "primary"
           plain = "true"
          > 
          <a :href=scope.row.url>excel模板下载</a>
          </el-button>
         
      </template>
    </el-table-column>
    </el-table>
</template>

<script>
export default {
   data() {
        return {
          tableData: [{
            num: 'N00001',
            name: '信用卡（ABC）',
            type: 'ABC',
            path: '/information_credit_card',
            url :"https://paper-final-1257740221.cos.ap-nanjing.myqcloud.com/%E4%BF%A1%E7%94%A8%E5%8D%A1%E8%A6%81%E7%B4%A0%E8%A1%A8%E6%A8%A1%E6%9D%BF.xlsx"
          }, 
          {

            num: 'N00002',
            name: '房贷（ABC）',
            type: 'ABC',
            path: '/information_house_loan',
            url :"https://paper-final-1257740221.cos.ap-nanjing.myqcloud.com/%E6%88%BF%E8%B4%B7%E8%A6%81%E7%B4%A0%E8%A1%A8%E6%A8%A1%E6%9D%BF%20.xls"
            

          }
   
          ]
        }
      },
          methods: {
      handleEdit(index, row) {
        console.log(index, row);
        console.log(row.path)
        this.$router.push(row.path)
      },

    }

}
</script>

<style>

</style>